<!-- <template>
    <image :class="$style.icon" :src="baseurl + src" />
</template>

<script lang="ts" setup>
    import { defineProps } from 'vue'
    const props = defineProps<{
            src: string,
        }>()

    const baseurl = import.meta.env.B_NET_STATIC_URL

</script>

<style lang="scss" module>
    .icon{
        border-radius: 30%;
    }
</style> -->

<template>
    <view v-if="type == 1" :class="[$style.box, color ? $style.full : '']" :style="{background : color || 'transparent'}">
        <component :is="Remixicons[icon]"></component>
    </view>
	<image v-else :class="$style.img" :src="baseurl + icon" />
</template>

<script lang="ts" setup>
    import * as Remixicons from "@remixicon/vue";
    const props = withDefaults(defineProps<{
        src?:string
        icon? : string;
        color?:string;
		type : number;
    }>(), {
        icon : 'RiTerminalBoxLine',
        color : '#246CFF'
    })
	
	const baseurl = import.meta.env.B_NET_STATIC_URL
</script>

<style lang="scss" module>
    .box{
        width: 80rpx;
        height: 80rpx;
        border-radius: 40%;
        display: flex;
        align-items: center;
        justify-content: center;

        &.full{
            color: #fff;
            font-size: 32px;
        }
    }
	
	.img{
		display: block;
		border-radius: 30%;
		width: 80rpx;
		height: 80rpx;
		border-radius: 40%;
	}
</style>